///////////////////////////////////////////////////////////////////////////////
// Copyright (c) 2009 Summit Contributors.  
// See: http://code.google.com/p/tyemill/wiki/SummitContributors
//
// The name and logo of Summit are trademarks of TYEMILL, LLC - All Rights 
// Reserved.
//
// Permission is hereby granted, free of charge, to any person obtaining a 
// copy of this software and associated documentation files (the "Software"), 
// to deal in the Software without restriction, including without 
// limitation the rights to use, copy, modify, merge, publish, distribute, 
// sublicense, and/or sell copies of the Software, and to permit persons to 
// whom the Software is furnished to do so, subject to the following 
// conditions:
//
// The above copyright notice and this permission notice shall be included 
// in all copies or substantial portions of the Software.
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 
// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING 
// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER 
// DEALINGS IN THE SOFTWARE.
///////////////////////////////////////////////////////////////////////////////

package summit.basecamp.constants
{
import org.tyemill.utils.EnumBase;

/** All supported Basecamp API operations. **/
public class BasecampOperation extends EnumBase
{
	/** @private - Singleton storage for id-name checks / conversations **/
	private static var _apiOperation:BasecampOperation;
	
	/** @private Constructor. **/
	public function BasecampOperation()
	{
	}
	
	/** @private A singleton representation of class used for name and id 
	 * conversations. **/
	public static function get instance():BasecampOperation
	{
		if(!_apiOperation) _apiOperation = new BasecampOperation();
		
		return _apiOperation;	
	}
	
	/** Represents a call to complete a resource supporting complete vs. 
	 * uncomplete state. **/
	public static const COMPLETE:String 	= instance.addValue("complete");
	/** Represents a call to create a new resource. **/
	public static const CREATE:String 		= instance.addValue("create");
	/** Represents a call to delete a resource. **/
	public static const DESTROY:String 		= instance.addValue("destroy");
	/** Represents a call to get an existing resource record for 
	 * <code>update</code>. **/
	public static const EDIT:String 		= instance.addValue("edit");
	/** Represents a call to get a list of existing resource records. **/
	public static const LIST:String 		= instance.addValue("list");
	/** Represents a call to get a template of a new resource record 
	 * instance for <code>create</code>. **/
	public static const PREPARE:String 		= instance.addValue("prepare");
	/** Represents a call to get a single existing resource record. **/
	public static const READ:String 		= instance.addValue("read");
	/** Represents a call to visually reorder records of resources 
	 * that support visual lists. **/
	public static const REORDER:String 		= instance.addValue("reorder");
	/** Represents a call to get a report for resources that support a 
	 * report-style query. **/
	public static const REPORT:String 		= instance.addValue("report");
	/** Represents a call to uncomplete a resource supporting 
	 * complete vs. uncomplete state. **/
	public static const UNCOMPLETE:String 	= instance.addValue("uncomplete");
	/** Represents a call to update an existing resource record with 
	 * new information. **/
	public static const UPDATE:String 		= instance.addValue("update");
	/** Represents a call to upload a file / attachment. **/
	public static const UPLOAD:String		= instance.addValue("upload");
}
}
//////////////////////////////////////////////////////// gmarius@tyemill.com //